<template>
    <div class="big-box">
        <div class="header">
            <img src="../../../../../assets/bigScreen/header4.png" alt="" />
            <div class="backBox" @click="goBack"></div>
        </div>
        <div class="backToBox">
            <div class="backTo" @click="gotoHome">
                <div>返回总窗口</div>
            </div>
            <div class="backTo" @click="backToOne">
                <div>返回上一页</div>
            </div>
        </div>
        <div class="centerBox">
            <div class="sreenTitle">金融产品</div>
            <div class="center">
                <div class="box-con">
            <!-- <div class="router-line">您所在的位置:首页>{{ tabList[tabAct] }}><span>活动详情</span></div> -->
            <div class="det-top">
                <div class="det-tl">
                    <img v-if="detail.bankUrl" :src="detail.bankUrl" alt="暂无图片">
                    <div>{{ detail.name }}</div>
                </div>
                <div class="det-tr">
                    <h3 style="color: #fff;">{{ detail.name }}</h3>
                </div>
                <div>
                    <div class="det-title">
                        <img src="../../../../../assets/bankTitleIcon.png " alt="暂无图片">
                        产品介绍
                    </div>
                    <div class="det-content" v-html="detail.content || '暂无'">
                    </div>
                </div>
                <div>
                    <div class="det-title">
                        <img src="../../../../../../src/assets/bankTitleIcon.png " alt="暂无图片">
                        产品特点
                    </div>
                    <div class="det-content">
                        <div class="det-characteristic">
                            <div class="det-title" style="display: flex;margin: 3rem 0;"
                                v-for="(item, index) in detail.features" :key="index">
                                <img src="../../../../../../src/assets/bankTitleIcon.png " alt="暂无图片">
                                <div style="font-weight: 500;">{{ item.feature }}</div>
                            </div>
                        </div>
                    </div>
                </div>

                <a-row>
                    <a-col :span="12">
                        <div>
                            <div class="det-title">
                                <img src="../../../../../../src/assets/bankTitleIcon.png " alt="暂无图片">
                                贷款额度
                            </div>
                            <div class="det-content">
                                {{ detail.quota }}
                            </div>
                        </div>
                    </a-col>
                    <a-col :span="12">
                        <div>
                            <div class="det-title">
                                <img src="../../../../../../src/assets/bankTitleIcon.png " alt="暂无图片">
                                贷款期限
                            </div>
                            <div class="det-content">
                                {{ detail.term }}
                            </div>
                        </div>
                    </a-col>
                </a-row>
                <div>
                    <div class="det-title">
                        <img src="../../../../../../src/assets/bankTitleIcon.png " alt="暂无图片">
                        担保方式
                    </div>
                    <a-row class="det-guarantee">
                        <a-col :span="4" v-for="(item, index) in detail.guaranteeList" :key="index">
                            <img src="../../../../../../src/assets/guarantee1.png " alt="暂无图片" v-if="item.guarantee.value == '005'">
                            <img src="../../../../../../src/assets/guarantee2.png " alt="暂无图片" v-if="item.guarantee.value == '020'">
                            <img src="../../../../../../src/assets/guarantee3.png " alt="暂无图片" v-if="item.guarantee.value == '040'">
                            <img src="../../../../../../src/assets/guarantee4.png " alt="暂无图片" v-if="item.guarantee.value == '010'">
                        </a-col>
                        <!-- <a-col :span="4">
                            <img src="../../../../../../src/assets/guarantee2.png " alt="暂无图片">
                        </a-col>
                        <a-col :span="4">
                            <img src="../../../../../../src/assets/guarantee2.png " alt="暂无图片">
                        </a-col>
                        <a-col :span="4">
                            <img src="../../../../../../src/assets/guarantee2.png " alt="暂无图片">
                        </a-col> -->
                    </a-row>
                </div>
                <div>
                    <div class="det-title">
                        <img src="../../../../../../src/assets/bankTitleIcon.png " alt="暂无图片">
                        基本条件
                    </div>
                    <a-row class="det-Basic">
                        <a-col :span="12" v-for="(item, index) in detail.conditions" :key="index">
                            <div class="detBox">
                                <div class="indexBox">
                                    {{ index + 1 }}
                                </div>
                                {{ item.basicCondition }}
                            </div>
                        </a-col>
                    </a-row>
                </div>

                <div>
                    <div class="det-title">
                        <img src="../../../../../../src/assets/bankTitleIcon.png " alt="暂无图片">
                        所需基础资料
                    </div>
                    <div class="det-content">
                        {{ detail.materials }}

                    </div>
                </div>
                <div style="display: flex;justify-content: center;">
                    <!-- <a-button type="primary" @click="toPage('/capital/bankLoan', { id: detail.id })">
                        立即申请
                    </a-button> -->
                </div>
            </div>
        </div>
        <div class="loan">
            <img src="../../../../../assets/capital/loanBgB.png" alt="">
        </div>
            </div>
        </div>
    </div>
</template>

<script>
import { getloanProductDet, getLoanProductVouch } from "../../../../../api/capital"
import { useStore } from "../../../../../store"

export default {
    components: {
        // actTabs
    },
    data() {
        return {
            tabList: ['最新资讯', '最新活动'],
            tabAct: 1,
            detail: {},
            detList: []
        }
    },
    mounted() {
        this.getDet(this.$route.query.id);
        this.storeR = useStore()
        // this.getDetList(this.$route.query.id);
    },
    methods: {
        getDet(id) {
            getloanProductDet(id).then(res => {
                if (res.code === 200) {
                    this.detail = res.data;
                }
            })
        },
        // getDetList(id) {
        // 	getActivityDetList({id: id}).then(res=>{
        // 		if(res.code === 200) {
        // 			this.detList = res.data?res.data.list:[];
        // 		}
        // 	})
        // },
        // gotoDet(id) {
        // 	this.$router.push({
        // 		path: 'activitiesDetail',
        // 		query: {
        // 			id: id
        // 		}
        // 	})
        // }
        toPage(url, query) {
            if (localStorage.getItem('token')) {
                if (localStorage.getItem('enterpriseName') == 'null') {
                    this.$message.warning('个人用户不支持申请贷款信息，请更换企业账号')
                    return
                }
            }
            if (localStorage.getItem('token')) {
                if (localStorage.getItem('authStatus') != 2) {
                    this.$message.warning('当前账号未提交认证信息，请在个人中心进行认证提交')
                    return
                } else {
                    this.$router.push({
                        path: url,
                        query: query,
                    })
                    return
                }
            } else {
                this.$message.warning('请先登录')
                this.storeR.setLoginVisible(true);
                // router.replace({ path: '/login' })
            }
        },
        gotoHome() {
            this.$router.push({
                path: '/bigScreenIndex',
            })
        },
        backToOne() {
            console.log('11');
            this.$router.go(-1)
        },
        goBack() {
            this.$router.push('/chart')
        }
    }
}
</script>

<style scoped lang="scss">
@font-face {
    font-family: "ffa";
    src: url(../../../assets/bigScreen/fonts/DS-DIGIB.TTF);
}
ul,
li {
    list-style: none;
}
.big-box {
    background-color: #071c3b;
    height: 100vh;
}
.header {
    position: relative;
    text-align: center;
    position: relative;
    height: 19.1rem;

    .backBox {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 70rem;
        height: 10rem;
        cursor: pointer;
    }

    > img {
        width: 100%;
        max-height: 100%;
        margin-top: -1.1rem;
        image-rendering: -moz-crisp-edges; /* Firefox */
        image-rendering: -o-crisp-edges; /* Opera */
        image-rendering: -webkit-optimize-contrast; /* Webkit (non-standard naming) */
        image-rendering: crisp-edges;
        -ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
    }
}
.centerBox {
    width: 96%;
    margin: 0 auto;
    position: absolute;
    top: 14rem;
    left: 2%;
    .sreenTitle {
        background-image: url("../../../../../assets/bigScreen/sreenTitle.png");
        background-size: 100% 100%;
        height: 3.8rem;
        padding-left: 35px;
        font-weight: 600;
        color: #fff;
        display: flex;
        align-items: center;
    }
    .center {
        margin-top: 1rem;
        height: calc(100vh - 20rem);
        border: 1px solid;
        border-image: linear-gradient(
                130deg,
                #2385df 0%,
                rgba(35, 133, 223, 0.65) 92%
            )
            1;
        overflow-y: scroll;
        padding: 20px;
.box-con {
    background-image: url(../../../assets/bankBg.png);
    background-size: 100%;
    background-repeat: no-repeat;
    min-height: 32rem;

    .router-line {
        font-size: 1.8rem;
        line-height: 2.2rem;
        color: #666;
        padding: 2rem;

        span {
            color: #000;
        }
    }

    .det-top {
        width: 140rem;
        padding: 5rem auto;
        // border: 0.1rem solid #CCCCCC;
        // border-radius: 0.8rem;
        // display: flex;
        margin: 0 auto;
        // justify-content: space-between;
        flex-wrap: wrap;
        padding: 4rem;

        .det-tl {
            margin-right: 4.5rem;
            display: flex;
            color: #fff;

            img {
                width: 100%;
                height: 100%;
                max-width: 12.5rem;
                max-height: 3.3rem;
                object-fit: cover;
            }

            div {
                padding: 0 10px;
                line-height: 3.3rem;
                font-size: 2.2rem;
                border-left: #c4c4c4 1px solid;
                margin-left: 10px;
            }
        }

        .det-tr {
            width: 65rem;
            padding: 6rem 0 6rem 0;

            h3 {
                font-size: 3rem;
                line-height: 2.9rem;
                color: #000;
                font-weight: 600;
            }

            .det-tag {
                font-size: 1.6rem;
                // line-height: 1.4rem;
                // color: #fff;
                color: #3D3D3D;
                padding: 0.4rem 0;
                border-radius: 0.4rem;
                margin: 1.4rem auto 2rem;
                display: inline-block;
            }

            .haveIn {
                background: #FFBD02;
            }

            .closed {
                background: #AEAEAE;
            }

            .det-tr-con {
                font-size: 1.8rem;
                line-height: 2.2rem;
                color: #7A8189;
                display: flex;
                background: #F1F7FF;
                padding: 2rem;

                // div {
                // 	margin-top: 1.3rem;
                // }
                span {
                    color: #000;
                }
            }
        }

        .det-title {
            font-size: 2rem;
            font-weight: 600;
            line-height: 3rem;
            color: rgba(255, 255, 255, 0.822);

            img {

                margin-right: 10px;
                width: 3rem;
                height: 3rem;
            }
        }

        .det-content {
            padding: 2rem 0 7rem calc(3rem + 10px);
            font-size: 1.8rem;
            line-height: 4rem;
            color: rgba(255, 255, 255, 0.822);
        }

        .det-characteristic {
            border: 2px solid rgba(3, 122, 255, 0.2);
            padding: 0rem 3rem;
            border-radius: 10px;
        }

        .det-guarantee {

            padding: 2rem 0 7rem calc(3rem + 10px);
            font-size: 1.8rem;
            line-height: 4rem;
            color: rgba(255, 255, 255, 0.822);

            img {
                width: 12rem;
                height: 12rem;
            }
        }

        .det-Basic {

            padding: 2rem 2rem 7rem calc(3rem + 10px);
            font-size: 1.8rem;
            line-height: 4rem;

            .detBox {

                border: 2px solid rgba(3, 122, 255, 0.2);
                padding: 4rem 3rem 2rem 3rem;
                border-radius: 8px;
                position: relative;
                margin: 5rem 3rem 5rem 0rem;
                text-align: center;
                color: #fff;

                .indexBox {
                    position: absolute;
                    width: 8rem;
                    height: 8rem;
                    // background-color: rgb(233, 173, 173);
                    background: radial-gradient(89% 89% at 50% 100%, #3D94FF 0%, #eef6ff 100%);
                    border-radius: 50%;
                    left: calc(50% - 4rem);
                    top: -4rem;
                    border: 4px solid rgb(255, 255, 255);
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    font-size: 2rem;
                    font-weight: 600;
                    color: #fff;
                }
            }
        }
    }
}

.loan {
    width: 100%;

    // height: 10rem;
    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}
    }
    ::-webkit-scrollbar {
        width: 5px;
        height: 10px;
    }

    /* 滚动条轨道 */
    ::-webkit-scrollbar-track {
        background-color: #234470;
    }

    /* 滚动条滑块 */
    ::-webkit-scrollbar-thumb {
        background-color: #061c57;
    }

    /* 鼠标悬停在滚动条上的滑块 */
    ::-webkit-scrollbar-thumb:hover {
        background-color: #555;
    }
}
.backToBox {
    position: absolute;
    top: 8rem;
    right: 2%;
    display: flex;
    z-index: 10;
    .backTo {
        background-image: url("../../../../../assets/bigScreen/backTo.png");
        color: #2dccff;
        background-size: 100% 100%;
        width: fit-content;
        padding: 2px 40px 10px 10px;
        font-weight: 600;
        cursor: pointer;
        margin-left: 10px;
        div {
            padding-top: 5px;
        }
    }
}
</style>
